<!DOCTYPE html>
<html lang="en">

<head>
  <title>My Todos</title>
  <script type="text/javascript" src="../node_modules/@azure/core-http/dist/coreHttp.browser.js"></script>
  <script type="text/javascript" src="../dist/coreArm.js"></script>

  <script type="text/javascript">
    document.write("hello world");
    const subscriptionId = "subscriptionId";
    const token = "token";
    const creds = new Azure.Core.HTTP.RawTokenCredential(token);
    const client = new Azure.Core.ARM.AzureServiceClient(creds);
    const req = {
      url: `https://management.azure.com/subscriptions/${subscriptionId}/providers/Microsoft.Storage/storageAccounts?api-version=2015-06-15`,
      method: "GET"
    };
    client.sendRequest(req).then((res) => { document.write(res.bodyAsText); }).catch((err) => { console.log(err); });
  </script>
</head>

<body>
</body>

</html>
